<script setup lang="ts">
import {GreetService} from "../../../bindings/quant/backend/service";
import {ref} from "vue";
import {NButton} from "naive-ui";

const result = ref("");

const openDialog = (t) => {
  GreetService.OpenDialog(t).then(() => {
    console.log("")
  }).catch((err: Error) => {
    result.value = err.toString();
  });
}
</script>

<template>
  <n-flex vertical>
    <n-space>
      <n-button type="default" tertiary @click="openDialog('info')">Info</n-button>
      <n-button type="success" tertiary @click="openDialog('success')">Success</n-button>
      <n-button type="warning" tertiary @click="openDialog('warn')">Warn</n-button>
      <n-button type="error" tertiary @click="openDialog('error')">Error</n-button>
      <n-button type="tertiary" tertiary @click="openDialog('question')">Question</n-button>
    </n-space>
    <div class="result">{{ result }}</div>
  </n-flex>

</template>

<style scoped>

</style>